package financial.sharing.center.common.enums;

/**
 * @ClassName ContractOperationStageEnum
 * @Description 合同创建过程
 * @Author guoyuhang
 * @ @csdn https://blog.csdn.net/qq_40788718
 * @Date 2021/4/3
 * @Version 1.0
 */
public enum ContractOperationStageEnum {

    无("无", 0),
    已创建("已创建", 1),
    待确认("待确认", 2),
    已确认("已确认", 3);

    private final String name;
    private final Integer value;

    ContractOperationStageEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public Integer getValue() {
        return this.value;
    }

    public static ContractTypeEnum name2Enum(String value) {
        for (ContractTypeEnum enumName : ContractTypeEnum.values()) {
            if(enumName.getName().equals(value)) {
                return enumName;
            }
        }
        return null;
    }

    public static ContractTypeEnum int2Enum(Integer value) {
        for (ContractTypeEnum enumName : ContractTypeEnum.values()) {
            if(enumName.getValue().equals(value)) {
                return enumName;
            }
        }
        return null;
    }
}
